A large number of execution methods of teaching programs for robots are called a sequential program method in which instructions are executed in the order of registration of instructions registered in a teaching program taught by an operator. During the execution of a teaching program, if a different teaching program is to be executed, a call instruction for calling the different teaching program will be registered in the teaching program and when the call instruction is executed the different program is executed.
In the prior art, when a different teaching program is to be executed during the execution of a teaching program, a call instruction has to be registered beforehand, and further instructions in the teaching program are executed in due order and when the call instruction is executed, the different teaching program is executed. Therefore, a different teaching program can be executed only in a position fixed in the execution of the teaching program, and a different teaching program is not capable of being executed in an optional position in the teaching program.
For example, when a robot is operated in a welding work operating a teaching program, it is impossible to make it retreat by urgently operating a different teaching program at an optional point.
Such necessity occurs when a plurality of robots are working in cooperation, one of the robots goes wrong, and the other robots are requested to stop operating.
The present invention of is directed to such circumstances and provides an execution method of a teaching program which can execute a different teaching program by the input of an interrupt input signal at an optional position during the execution of the teaching program.